﻿using StarsAdmin.Core.Enums;
using System.ComponentModel.DataAnnotations;

namespace StarsAdmin.Application.Menu.Dtos
{
    public class AddMenuInput
    {
        /// <summary>
        /// 菜单名称
        /// </summary>
        [Required(ErrorMessage = "菜单名称不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 菜单路由地址
        /// </summary>
        public string? Path { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Required(ErrorMessage = "菜单标题不能为空")]
        public string Title { get; set; }

        /// <summary>
        /// 组件位置
        /// </summary>
        public string? ComponentPath { get; set; }

        /// <summary>
        /// 菜单重定向地址
        /// </summary>
        public string? Redirect { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string? Icon { get; set; }

        /// <summary>
        /// 菜单类型
        /// </summary>
        [Required(ErrorMessage = "菜单类型不能为空")]
        public MenuTypeEnum Type { get; set; }

        /// <summary>
        /// 权限字段
        /// </summary>
        public string? Permission { get; set; }

        /// <summary>
        /// 菜单描述
        /// </summary>
        public string? Description { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 父级菜单Id
        /// </summary>
        public long? ParentId { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; }

        /// <summary>
        /// 是否在菜单栏显示
        /// </summary>
        public bool IsHidden { get; set; }

        /// <summary>
        /// 是否缓存
        /// </summary>
        public bool IsKeepalive { get; set; }

        /// <summary>
        /// 是否固定在标签页
        /// </summary>
        public bool IsAffis { get; set; }

        /// <summary>
        /// 菜单拥有的接口的Id
        /// </summary>
        public long[]? ApiIds { get; set; }
    }
}